 Hyperlink (Subclass control & OwnerDraw control ) Example
 RobotBob (Eric Asbell)
 easbell@quanta-it.com
 http://easbell.quanta-it.com
 2005

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Level:        Intermediate
 Requires:     a base knowledge of Win32 api.

 I make an assumption that you know the basics of
 creating an win32 application, fundmental assembly
 and how to use win32 api documentation.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 What is this example about ?
 It simulates the function of a *Hyperlink*.

 There are many way to do this, each more or less
 produces the same thing. In this example we use a
 new API call (not part of the original win95) 
 TrackMouseEvent. There are two calls, one of which 
 is commented out. The USER32 version is availible in
 Win98+ & NT 4.0 and the COMCTL32 version is availible
 in IE 3 or greater. The easy way is to just load the
 COMCTL32 version. Or you could use LoadLibrary and
 only load the correct one based on OS version. To
 me this is ideal in this type of situation, it unsures
 the OS will not break your program. However I have omitted
 just that for clarity in this example.

 What is *Subclass* ?

 A subclass is a window or set of windows with the same
 class whose messages are intercepted and processed by
 another window procedure (or procedures) before being
 passed to the window procedure of the class.
 Or better in simple english, We hijack the damn thing :)

 What is Owner Draw ?

 On creation of our control, we specify it (in this case
 &SS_OWNERDRAW) in the CreateWindow call. We now are 
 responsible for drawing the control in the message: 
 &WM_DRAWITEM.

 Key Functions in this example:

 DrawTheHyperLink
 HyperLinkProc

 the call to TrackMouseEvent.
 the call to SetWindowLong.
 the process of drawing the hyperlink in the WM_DRAWITEM message.

 If you find a an error or have a question feel free to email me.

(EOF)